package com.rzjm.exercise.module.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rzjm.exercise.common.base.data.DataTableLayUI;
import com.rzjm.exercise.common.base.service.BaseService;
import com.rzjm.exercise.common.exception.TransactionalException;
import com.rzjm.exercise.module.domain.EventsSection;
import com.rzjm.exercise.module.domain.Shop;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 会员卡
 *
 * @author mr.zhou
 * @email zhouwei_nice@163.com
 * @date 2020-12-15 22:36:23
 */
public interface ShopService extends BaseService<Shop> {

    List<Shop> getPageByUserId(Page<Shop> page, Map<String,Object> map);

    List<Shop> getPageByUserId(Map<String,Object> map);

    int remove(Integer id) throws TransactionalException;

    List<Shop> getPageByAdminUserId(Page<Shop> page, Map<String,Object> map);

    List<Shop> getPageByAdminUserId(Map<String,Object> map);


    /**
     *  获取当前企业的所有类型的设备数
     * @param  shopId - 企业id
     * @return
     */
    Shop getDeviceCountByShopId(Integer shopId);

    Double getDeviceAvgDataByTime(Map<String, Object> temperatureMap);


    List<Shop> getShopListByWenduValue(Page<Shop> page ,Map<String, Object>  map);

    DataTableLayUI<Shop> getShopDeviceCountListPage(DataTableLayUI<Shop> condition);
}
